package com.blue.firecat.serivce;

import com.blue.firecat.contants.Result;
import com.blue.firecat.dto.TradeStatusDto;
import com.blue.firecat.entity.OrderExample;
import com.blue.firecat.entity.Trade;
import com.blue.firecat.entity.TradeExample;
import com.blue.firecat.entity.User;
import com.blue.firecat.vo.TradeVo;

import java.util.List;
import java.util.Map;

/**
 * @描述
 * @时间 2017/6/22 22:57
 * @作者 肖亦鸣
 */
public interface TradeService {

    int deleteByExample(TradeExample example);

    Result<Trade> deleteByPrimaryKey(Long id);

    Result<Trade> insertSelective(User user, Trade record);

    Result<List<Trade>> selectByExample(TradeVo tradeVo, User user);

    Result<Trade> selectByPrimaryKey(Long id, User user);

    Result<Trade> updateByPrimaryKeySelective(TradeVo tradeVo, User user);

    Result<Trade> setTradeWork(TradeVo tradeVo, User user);

    Result<Trade> setTradeNotPass(TradeVo tradeVo, User user);

    Result<Trade> settlerTrade(TradeVo tradeVo, User user);

    Result<Trade> settlerTradeAll(TradeVo tradeVo, User user);

    Result<Trade> checkThrough(TradeVo tradeVo, User user);

    Result<Trade> setTradeCheckToNotPass(TradeVo tradeVo, User user);

    Result addPics(String fileNameNew, TradeVo tradeVo, User user);

    Result<Trade> tradeCommitError(TradeVo tradeVo, User user);

    Result<Trade> tradeAgree(User user, TradeVo tradeVo);

    Result<List<Trade>> tradeCount(TradeVo tradeVo, User userBySession);

    Result<Trade> revokeTrade(TradeVo tradeVo, User userBySession);

    Result<Map<String, Integer>> countByExample(User user);


    Result<Object> countMoneyByExample(User user);

    void setExpiredFromEmail();

    Object count();
}
